package com.liuyusong.start;

import java.awt.*;
import java.util.regex.Pattern;
//用于存放常量
public class Const {
    public Const(){}
    //字符常量
    public static final String TITLE = "计算器";
    public static final String RESULT = "计算结果";
    //容器自定义大小
    public static final int FRAME_W = 330;
    public static final int RESULT_W = 300;
    public static final int FRAME_H = 450;
    public static final int RESULT_H = 200;
    //当前屏幕大小
    public static final int SCREEN_W = Toolkit.getDefaultToolkit().getScreenSize().width;
    public static final int SCREEN_H = Toolkit.getDefaultToolkit().getScreenSize().height;
    //容器定位
    public static final int frame_x = (SCREEN_W - FRAME_W) / 2;
    public static final int result_x = (SCREEN_W - RESULT_W) / 2;
    public static final int frame_y = (SCREEN_H - FRAME_H) / 2;
    public static final int result_y = (SCREEN_H - RESULT_H) / 2;
    //按钮添加字符
    /*注:CBK表示倒数
    CBK用法:CBK(x) = 1/x
    Sqrt表示开方
    C表示清除上一个输入的字符
    AC表示删除此次计算输入的所有字符
    ±表示正负号
    M+表示获取上轮计算结果*/
    private static final String str1 = "M+,±,%,AC,Sin,Cos,CBK,C,Sqrt,^,(,),7,8,9,+,4,5,6,-,1,2,3,*,.,0,/,=";
    public static final String[] CHARACTERS = str1.split(",");
    //数字
    private static final String str2 = ".,0,1,2,3,4,5,6,7,8,9";
    public static final String[] NUMBER = str2.split(",");
    //操作符
    private static final String str3 = "+,-,*,/,%,Sqrt,Sin,Cos,^,(,)";
    public static final String[] OPERATOR = str3.split(",");
    //可显示的输入符
    private static final String str4 = "%,Sin,Cos,CBK,Sqrt,^,(,),7,8,9,+,4,5,6,-,1,2,3,*,.,0,/";
    public static final String[] VISUALABLECHAR = str4.split(",");
}